<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>插值表达式 </title>
</head>
<body>
    <div >
        <div id="app">
           {{obj.name}}--{{obj.age}}
           {{title.substr(0,3)}}
           {{age>17 ? '成年人' :'未成年'}}
           {{fn1()}}
        </div>
 
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script>
 
        var vm = new Vue({
            // 监管的容器 
            el:'#app',
            // 数据定义
            data:{
                msg:'你好世界22222',
                name:'张三',
                title:'我是一个标题哦',
                age:15,
                obj:{
                    name:'tom',
                    age:20
                } ,
                fn1:()=>{
                    return 66666
                },
            }
        })
     
        console.log('vm',vm)

      

    </script>
</body>

</html>